{% extends 'base.html' %}

{% block content %}
    <div class="row mb-4">
        <div class="col-md-12">
            <h1>注册</h1>
        </div>
    </div>

    <div class="card col-md-6 mx-auto">
        <div class="card-header">
            <h5>创建新账号</h5>
        </div>
        <div class="card-body">
            <form method="post" action="{{ url_for('main.register') }}">
                <div class="form-group">
                    <label for="username">用户名 <span class="text-danger">*</span></label>
                    <input type="text" class="form-control" id="username" name="username" required>
                </div>

                <div class="form-group">
                    <label for="email">邮箱 <span class="text-danger">*</span></label>
                    <input type="email" class="form-control" id="email" name="email" required>
                </div>

                <div class="form-group">
                    <label for="password">密码 <span class="text-danger">*</span></label>
                    <input type="password" class="form-control" id="password" name="password" required>
                </div>

                <div class="form-group">
                    <label for="confirm_password">确认密码 <span class="text-danger">*</span></label>
                    <input type="password" class="form-control" id="confirm_password" name="confirm_password" required>
                </div>

                <button type="submit" class="btn btn-primary btn-block">注册</button>
            </form>

            <div class="mt-3 text-center">
                <p>已有账号？ <a href="{{ url_for('main.login') }}">立即登录</a></p>
            </div>
        </div>
    </div>
{% endblock %}